<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="favicon.ico" rel="shortcut icon" type="image/vnd.microsoft.icon" />
<title>天龙八部伤害计算器 v1.2</title>
<link rel="stylesheet" type="text/css" href="style/calc.css" />
<script type="text/javascript" src="script/calc.js" charset="UTF-8"></script>
</head>
<body>
	<div class="main">
		<div>
			<h1>天龙八部伤害计算器 v1.2</h1>
		</div>
		<div class="row">
			<table>
				<tr>
					<th class="title"><label for="role">门派：</label></th>
					<td><select class="field" id="role">
							<option value="sl">少林</option>
							<option value="mr">慕容</option>
							<option value="ts">天山</option>
							<option value="mj">明教</option>
							<option value="gb">丐帮</option>
							<option value="xy">逍遥</option>
							<option value="wd">武当</option>
							<option value="em">峨眉</option>
							<option value="tl">天龙</option>
							<option value="xx">星宿</option>
							<option value="tm">唐门</option>
							<option value="gg">鬼谷</option>
							<option value="thd">桃花岛</option>
					</select></td>
				</tr>
			</table>
		</div>
		<div class="row">
			<table>
				<tr>
					<th class="title"></th>
					<th class="title_center">属性</th>
					<th class="title_center">减抗</th>
					<th class="title_center">减抗下限</th>
				</tr>
				<tr>
					<th>冰攻：</th>
					<td><input type="text" id="b_0" class="field b" value="" placeholder="0" title="冰属性" /></td>
					<td><input type="text" id="b_1" class="field b" value="" placeholder="0" title="减冰抗" /></td>
					<td><input type="text" id="b_2" class="field b" value="" placeholder="0" title="减冰抗下限" /></td>
				</tr>
				<tr>
					<th>火攻：</th>
					<td><input type="text" id="h_0" class="field h" value="" placeholder="0" title="火属性" /></td>
					<td><input type="text" id="h_1" class="field h" value="" placeholder="0" title="减火抗" /></td>
					<td><input type="text" id="h_2" class="field h" value="" placeholder="0" title="减火抗下限" /></td>
				</tr>
				<tr>
					<th>玄攻：</th>
					<td><input type="text" id="x_0" class="field x" value="" placeholder="0" title="玄属性" /></td>
					<td><input type="text" id="x_1" class="field x" value="" placeholder="0" title="减玄抗" /></td>
					<td><input type="text" id="x_2" class="field x" value="" placeholder="0" title="减玄抗下限" /></td>
				</tr>
				<tr>
					<th>毒攻：</th>
					<td><input type="text" id="d_0" class="field d" value="" placeholder="0" title="毒属性" /></td>
					<td><input type="text" id="d_1" class="field d" value="" placeholder="0" title="减毒抗" /></td>
					<td><input type="text" id="d_2" class="field d" value="" placeholder="0" title="减毒抗下限" /></td>
				</tr>
			</table>
		</div>
		<div class="row">
			<table>
				<tr>
					<th class="title"><label for="w_0">外功：</label></th>
					<td><input type="text" id="w_0" class="field" value="" placeholder="0" title="外功" /></td>
					<th style="width: 8.4em;"><label for="w_1">修炼增加的外功：</label></th>
					<td><input type="text" id="w_1" class="field" value="" placeholder="0" title="修炼增加的外功" /></td>
				</tr>
				<tr>
					<th><label for="n_0">内功：</label></th>
					<td><input type="text" id="n_0" class="field" value="" placeholder="0" title="内功" /></td>
					<th><label for="n_1">修炼增加的内功：</label></th>
					<td><input type="text" id="n_1" class="field" value="" placeholder="0" title="修炼增加的内功" /></td>
				</tr>
			</table>
		</div>
		<div class="row">
			<table>
				<tr>
					<th class="title"><label for="c">穿刺：</label></th>
					<td><input type="text" id="c" class="field" value="" placeholder="0" title="穿刺" /></td>
				</tr>
			</table>
		</div>
		<div class="row">
			<table>
				<tr>
					<th class="title"><label for="target">目标：</label></th>
					<td><select class="field" id="target" onchange="selectTarget();"></select></td>
				</tr>
				<tr>
					<td></td>
					<td><a href="javascript:void(0);" onclick="switchTargetDesc();">显示/隐藏目标属性</a></td>
				</tr>
			</table>
			<table id="targetDesc" style="display: none;">
				<tr>
					<td>类型：</td>
					<td><span id="t_type"></span></td>
				</tr>
				<tr>
					<td>名称：</td>
					<td><span id="t_name"></span></td>
				</tr>
				<tr>
					<td>冰抗：</td>
					<td><span id="t_bk"></span></td>
				</tr>
				<tr>
					<td>火抗：</td>
					<td><span id="t_hk"></span></td>
				</tr>
				<tr>
					<td>玄抗：</td>
					<td><span id="t_xk"></span></td>
				</tr>
				<tr>
					<td>毒抗：</td>
					<td><span id="t_dk"></span></td>
				</tr>
				<tr>
					<td>外功防御：</td>
					<td><span id="t_wf"></span></td>
				</tr>
				<tr>
					<td>内功防御：</td>
					<td><span id="t_nf"></span></td>
				</tr>
				<tr>
					<td>穿刺防御：</td>
					<td><span id="t_cf"></span></td>
				</tr>
			</table>
		</div>
		<div class="row" style="text-align: center;">
			<input type="button" value="伤害计算" class="btn" onclick="calcDamage();">
		</div>
		<div class="row">
			<h2>伤害计算结果</h2>
			<hr>
			<table>
				<tr>
					<td style="width: 8.4em;">冰属性伤害：</td>
					<td><span id="r_b">0</span></td>
				</tr>
				<tr>
					<td>火属性伤害：</td>
					<td><span id="r_h">0</span></td>
				</tr>
				<tr>
					<td>玄属性伤害：</td>
					<td><span id="r_x">0</span></td>
				</tr>
				<tr>
					<td>毒属性伤害：</td>
					<td><span id="r_d">0</span></td>
				</tr>
				<tr>
					<td>外功伤害：</td>
					<td><span id="r_w">0</span></td>
				</tr>
				<tr>
					<td>内功伤害：</td>
					<td><span id="r_n">0</span></td>
				</tr>
				<tr>
					<td>穿刺伤害：</td>
					<td><span id="r_c">0</span></td>
				</tr>
				<tr>
					<td>总伤害：</td>
					<td><span id="r_t">0</span></td>
				</tr>
				<tr>
					<td>总伤害（暴击）：</td>
					<td><span id="r_t2">0</span></td>
				</tr>
			</table>
			<hr>
			<table>
				<tr>
					<td>客户端显示伤害：</td>
				</tr>
				<tr>
					<td><span id="r_show"></span><span id="r_show_c"></span></td>
				</tr>
				<tr>
					<td>客户端显示伤害（暴击）：</td>
				</tr>
				<tr>
					<td><span id="r_show2"></span><span id="r_show2_c"></span></td>
				</tr>
			</table>
		</div>
		<div class="row footer">
			<h2>说明</h2>
			<hr>
			<ul>
				<li>以上所有字段，均要求请填写<strong>正整数</strong>，可以留空（默认为0），不可以输入负数、小数、字母和其他特殊符号。</li>
				<li>各门派属性系数和外功、内功系数来源于畅游精灵官方，经验证与客户端文件<span class="code">AttackTraits.txt</span>中的数值一致。</li>
				<li>怪物信息从客户端文件<span class="code">MonsterAttrExTable.txt</span>获取。</li>
				<li>为方便测试，选择目标中添加了四抗、杂抗峨眉。数值为模拟，仅供参考。</li>
				<li>程序作者：区服：超级网通 - 独步江湖，游戏角色：o小武当o</li>
				<li>程序版本：v1.2，日期：2020-05-30</li>
			</ul>
		</div>
	</div>
</body>
</html>